<?php

class Controller_Sample_Captcha extends Controller_Abstract
{
    public function indexAction()
    {
        // 表单提交前
        if (!$this->isPost()) {

        // 表单提交后
        } else {

            $captchaObj = new Com_Captcha();
            var_dump($captchaObj->check($this->get('vcode')));

            return false;
        }

    }

    public function showAction()
    {
        $captchaObj = new Com_Captcha();
        $captchaObj->create();  // 会直接输出二进制流
    }
}